<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@include file="/include/public.jspf"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-base.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/m-common.css" />
<link rel="stylesheet" type="text/css" href="${path }/css/default/p-all.css" />

<script type="text/javascript" src="${path }/js/lib/zepto.js"></script>
<script type="text/javascript" src="${path }/js/lib/lib.js"></script>
<script type="text/javascript" src="${path }/js/jquery1.10.2.min.js"></script>
<title>首页</title>
</head>

<body>
<div class="p_index_new">
<link type="text/css" rel="stylesheet" href="${path }/css/default/slider.css" />
<link type="text/css" rel="stylesheet" href="${path }/css/default/slider.default.css" />
<div class="ui_title">魔环金融</div>

       <!-- <ul class="ui_tab_nav ui_tab_num2 ui_border_t">
                <li class="select" style="font-size: 20px;"><span>金融<em></em></span></li>
                <li class=""  style="font-size: 20px;"><span>电影<em></em></span></li>
      </ul> -->
            

 <div class="banner">
   <div class="focus" id="slider">
      <div class="slideDiv"><a target="_blank" href="http://mp.weixin.qq.com/s?__biz=MzAwODY5MjgyNw==&mid=211057409&idx=1&sn=09d0f09759390b3b0c303394bf460d03#rd"><img lazyload='${path }/images/banner/m1.jpg'></a></div>
      <div class="slideDiv"><a target="_blank" href='http://mp.weixin.qq.com/s?__biz=MzAwODY5MjgyNw==&mid=211562148&idx=2&sn=4a0497c6feeac4fa400de818329dc0bb&scene=0#rd'><img lazyload='${path }/images/banner/m2.jpg'></a></div>
      <div class="slideDiv"><a target="_blank" href='http://mp.weixin.qq.com/s?__biz=MzAwODY5MjgyNw==&mid=211562148&idx=1&sn=1831c0ed02e47da62e8d2e8073f07166&scene=0#rd'><img lazyload='${path }/images/banner/m3.jpg'></a></div>
      <div class="slideDiv"><a target="_blank" href='http://mp.weixin.qq.com/s?__biz=MzAwODY5MjgyNw==&mid=211057245&idx=1&sn=f4d9484cb764254593554885914832f8#rd'><img lazyload='${path }/images/banner/m4.jpg'></a></div>
      <div class="slideDiv"><a target="_blank" href='http://mp.weixin.qq.com/s?__biz=MzA3MTM3MzE0Nw==&mid=400326152&idx=1&sn=66f0395603ac214a000e1c29f32e5ac8#rd'><img lazyload='${path }/images/banner/m5.jpg'></a></div>
</div>
</div>

<c:if test="${empty usersession }">
<div class="login_nav">
   <div class="ui_btn">
     <span><a href="${path }/user/login" class="login_btn">登录</a></span>
     <span><a href="${path }/user/register" class="register_btn">注册</a></span>
   </div>
 </div>
 </c:if>
  <c:if test="${not empty usersession }">
 <div class="account">
  <p>${usersession.user.userName}，您的可用余额(元)</p>
  <p>
      <span class="f20"><fmt:formatNumber value="${(account.baseMoney-account.freezeMoney)/100 }" type="currency" pattern="0.00"/></span>
      (红包  <span><fmt:formatNumber value="${redMoney/100 }" type="currency" pattern="0"/></span>)
  </p>
</div>
<div class="sub_nav">
        <dl class="clearfix">
        <c:choose>
           <c:when test="${not empty user.trustAccountId}">
	          <dt data-href="${path }/borrowInfo/list.htm">
	            <div class="icon_bk"></div>
	            <div class="text_con">
	              <h2>开户成功</h2>
	              <p>马上投资<br>享受投资乐趣</p>
	            </div>
	          </dt>
          </c:when>
          <c:otherwise>
	           <dt data-href="${path }/member/goregpnr.htm">
	            <div class="icon_bk"></div>
	            <div class="text_con">
	              <h2>验证开户<i class="icon_new"></i></h2>
	              <p>完成验证开户<br>开启投资之旅</p>
	            </div>
	           </dt>
          </c:otherwise>
          </c:choose>
          <dd data-href="${path }/borrowInfo/list.htm">
            <div class="icon_st"></div>
            <div class="text_con">
              <h2>投资送红包<!-- <i class="icon_new"></i> --></h2>
              <p>投200元返红包200元<br></p>
            </div>
          </dd>
          </dl>
</div>
</c:if>
<%-- <c:import url="include/head.jsp"></c:import> --%>
      <div class="deal_list">
        <div class="title">
          <span class="line"></span>
          <em>热标推荐</em>
        </div>
       <c:if test="${not empty productList }">
          <c:forEach items="${productList }" var="auto">              
        <div class="item red_bg">
          <a href="${path}/borrowInfo/detail.htm?borrowId=${auto.id}" class="link_detail"></a>
          <div class="deal_title">
            <span class="deal_fx">${auto.repaymentType.text}</span><h2>${auto.borrowName }</h2>
          </div>
          <div class="clearfix deal_con">
                        <div class="fl"><span>${auto.borrowDuration}</span><em><c:if test="${auto.durType eq 'DAY'}">天</c:if>
															<c:if test="${auto.durType eq 'MONTH'}">个月</c:if> </em></div>
                        <div class="fr">
                		<c:choose>
							<c:when test="${auto.status eq 'RAISE'}">
								<a href="${path}/borrowInfo/invest.htm?borrowId=${auto.id}"
									class="btn red_btn">投资</a>
							</c:when>
							<c:when
								test="${auto.status eq 'REPAYMENTED'}">
								<span class="btn grag_btn">已还清</span>
							</c:when>
							<c:when
								test="${auto.status eq 'REPAYMENTING'}">
								<span class="btn grag_btn">还款中</span>
							</c:when>
							<c:when
								test="${auto.status eq 'LOANING'}">
								<span class="btn grag_btn">放款中</span>
							</c:when>
							<c:when
								test="${auto.status eq 'END' and (auto.borrowMoney-auto.raiseMoney)<=0}">
								<span class="btn grag_btn">满标</span>
							</c:when>
							<c:otherwise>
								<span class="btn grag_btn">筹款结束</span>
							</c:otherwise>
						</c:choose>
                         </div>
            <div class="deal_nh"><span>${auto.borrowRate}</span><em>%</em></div>
          </div>
          <div class="progrss" style="width:${(auto.raiseMoney / auto.borrowMoney) * 100}%">
            <span class="pro_num"><fmt:formatNumber value="${(auto.raiseMoney / auto.borrowMoney) * 100}" type="currency" pattern="0.00"/>%</span>
            <span class="icon_pro"></span>
          </div>
        </div>
        </c:forEach>
                </c:if>
       <div class="ui_deal_more"><a href="${path }/borrowInfo/list.htm" class="bank_link">查看全部项目</a></div>
      </div>
      <c:import url="../include/foot.jsp">
      		<c:param name="type" value="index"></c:param>
      </c:import>
</div>

<script type="text/javascript" src="${path }/js/index.js"></script>
<script type="text/javascript" src="${path }/js/slider.js"></script>
</body>
</html>